<!DOCTYPE html>
<html lang="en">
  <head>
    <title>Group Class Reference</title>
    <link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
    <link rel="stylesheet" type="text/css" href="../css/highlight.css" />
    <meta charset='utf-8'>
    <script src="../js/jquery.min.js" defer></script>
    <script src="../js/jazzy.js" defer></script>
    
    <script src="../js/lunr.min.js" defer></script>
    <script src="../js/typeahead.jquery.js" defer></script>
    <script src="../js/jazzy.search.js" defer></script>
  </head>
  <body>
    <a name="//apple_ref/swift/Class/Group" class="dashAnchor"></a>
    <a title="Group Class Reference"></a>
    <header>
      <div class="content-wrapper">
        <p><a href="../index.html">Mixpanel 5.0.0 Docs</a> (77% documented)</p>
        <p class="header-right"><a href="https://github.com/mixpanel/mixpanel-swift"><img src="../img/gh.png" alt="GitHub"/>View on GitHub</a></p>
        <div class="header-right">
          <form role="search" action="../search.json">
            <input type="text" placeholder="Search documentation" data-typeahead>
          </form>
        </div>
      </div>
    </header>
    <div class="content-wrapper">
      <p id="breadcrumbs">
        <a href="../index.html">Mixpanel Reference</a>
        <img id="carat" src="../img/carat.png" alt=""/>
        Group Class Reference
      </p>
    </div>
    <div class="content-wrapper">
      <nav class="sidebar">
        <ul class="nav-groups">
          <li class="nav-group-name">
            <a href="../Classes.html">Classes</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="../Classes/Group.html">Group</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes/Mixpanel.html">Mixpanel</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes/MixpanelInstance.html">MixpanelInstance</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes/MixpanelLogger.html">MixpanelLogger</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes/People.html">People</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a href="../Enums.html">Enumerations</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="../Enums/GzipError.html">GzipError</a>
              </li>
              <li class="nav-group-task">
                <a href="../Enums/MixpanelLogLevel.html">MixpanelLogLevel</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a href="../Extensions.html">Extensions</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="../Extensions/Array.html">Array</a>
              </li>
              <li class="nav-group-task">
                <a href="../Extensions/Bool.html">Bool</a>
              </li>
              <li class="nav-group-task">
                <a href="../Extensions/Data.html">Data</a>
              </li>
              <li class="nav-group-task">
                <a href="../Extensions/Date.html">Date</a>
              </li>
              <li class="nav-group-task">
                <a href="../Extensions/Dictionary.html">Dictionary</a>
              </li>
              <li class="nav-group-task">
                <a href="../Extensions/Double.html">Double</a>
              </li>
              <li class="nav-group-task">
                <a href="../Extensions/Float.html">Float</a>
              </li>
              <li class="nav-group-task">
                <a href="../Extensions/Int.html">Int</a>
              </li>
              <li class="nav-group-task">
                <a href="../Extensions/NSArray.html">NSArray</a>
              </li>
              <li class="nav-group-task">
                <a href="../Extensions/NSNull.html">NSNull</a>
              </li>
              <li class="nav-group-task">
                <a href="../Extensions/NSNumber.html">NSNumber</a>
              </li>
              <li class="nav-group-task">
                <a href="../Extensions/NSString.html">NSString</a>
              </li>
              <li class="nav-group-task">
                <a href="../Extensions/Optional.html">Optional</a>
              </li>
              <li class="nav-group-task">
                <a href="../Extensions/String.html">String</a>
              </li>
              <li class="nav-group-task">
                <a href="../Extensions/UInt.html">UInt</a>
              </li>
              <li class="nav-group-task">
                <a href="../Extensions/URL.html">URL</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a href="../Protocols.html">Protocols</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="../Protocols/MixpanelDelegate.html">MixpanelDelegate</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/MixpanelLogging.html">MixpanelLogging</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/MixpanelProxyServerDelegate.html">MixpanelProxyServerDelegate</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/MixpanelType.html">MixpanelType</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a href="../Structs.html">Structures</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="../Structs/MixpanelLogMessage.html">MixpanelLogMessage</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/ProxyServerConfig.html">ProxyServerConfig</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/ServerProxyResource.html">ServerProxyResource</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a href="../Typealiases.html">Type Aliases</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="../Typealiases.html#/s:8Mixpanel10Propertiesa">Properties</a>
              </li>
            </ul>
          </li>
        </ul>
      </nav>
      <article class="main-content">
        <section>
          <section class="section">
            <h1>Group</h1>
              <div class="declaration">
                <div class="language">
                  
                  <pre class="highlight swift"><code><span class="kd">open</span> <span class="kd">class</span> <span class="kt">Group</span></code></pre>

                </div>
              </div>
            <p>Access to the Mixpanel Groups API, available through the getGroup function from
the main Mixpanel instance.</p>

          </section>
          <section class="section task-group-section">
            <div class="task-group">
              <div class="task-name-container">
                <a name="/Group"></a>
                <a name="//apple_ref/swift/Section/Group" class="dashAnchor"></a>
                <div class="section-name-container">
                  <a class="section-name-link" href="#/Group"></a>
                  <h3 class="section-name"><span>Group</span>
</h3>
                </div>
              </div>
              <ul>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:8Mixpanel5GroupC3set10propertiesySDySSAA0A4Type_pG_tF"></a>
                    <a name="//apple_ref/swift/Method/set(properties:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:8Mixpanel5GroupC3set10propertiesySDySSAA0A4Type_pG_tF">set(properties:<wbr>)</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Sets properties on this group.</p>

<p>Property keys must be String objects and the supported value types need to conform to MixpanelType.
MixpanelType can be either String, Int, UInt, Double, Float, Bool, [MixpanelType], [String: MixpanelType], Date, URL, or NSNull.
If the existing group record on the server already has a value for a given property, the old
value is overwritten. Other existing properties will not be affected.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">open</span> <span class="kd">func</span> <span class="nf">set</span><span class="p">(</span><span class="nv">properties</span><span class="p">:</span> <span class="kt"><a href="../Typealiases.html#/s:8Mixpanel10Propertiesa">Properties</a></span><span class="p">)</span></code></pre>

                        </div>
                      </div>
                      <div>
                        <h4>Parameters</h4>
                        <table class="graybox">
                          <tbody>
                            <tr>
                              <td>
                                <code>
                                <em>properties</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>properties dictionary</p>
                                </div>
                              </td>
                            </tr>
                          </tbody>
                        </table>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:8Mixpanel5GroupC3set8property2toySS_AA0A4Type_ptF"></a>
                    <a name="//apple_ref/swift/Method/set(property:to:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:8Mixpanel5GroupC3set8property2toySS_AA0A4Type_ptF">set(property:<wbr>to:<wbr>)</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Convenience method for setting a single property in Mixpanel Groups.</p>

<p>Property keys must be String objects and the supported value types need to conform to MixpanelType.
MixpanelType can be either String, Int, UInt, Double, Float, Bool, [MixpanelType], [String: MixpanelType], Date, URL, or NSNull.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">open</span> <span class="kd">func</span> <span class="nf">set</span><span class="p">(</span><span class="nv">property</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span> <span class="nv">to</span><span class="p">:</span> <span class="kt"><a href="../Protocols/MixpanelType.html">MixpanelType</a></span><span class="p">)</span></code></pre>

                        </div>
                      </div>
                      <div>
                        <h4>Parameters</h4>
                        <table class="graybox">
                          <tbody>
                            <tr>
                              <td>
                                <code>
                                <em>property</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>property name</p>
                                </div>
                              </td>
                            </tr>
                            <tr>
                              <td>
                                <code>
                                <em>to</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>property value</p>
                                </div>
                              </td>
                            </tr>
                          </tbody>
                        </table>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:8Mixpanel5GroupC7setOnce10propertiesySDySSAA0A4Type_pG_tF"></a>
                    <a name="//apple_ref/swift/Method/setOnce(properties:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:8Mixpanel5GroupC7setOnce10propertiesySDySSAA0A4Type_pG_tF">setOnce(properties:<wbr>)</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Sets properties on the current Mixpanel Group, but doesn&rsquo;t overwrite if
there is an existing value.</p>

<p>This method is identical to <code>set:</code> except it will only set
properties that are not already set. It is particularly useful for collecting
data about dates representing the first time something happened.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">open</span> <span class="kd">func</span> <span class="nf">setOnce</span><span class="p">(</span><span class="nv">properties</span><span class="p">:</span> <span class="kt"><a href="../Typealiases.html#/s:8Mixpanel10Propertiesa">Properties</a></span><span class="p">)</span></code></pre>

                        </div>
                      </div>
                      <div>
                        <h4>Parameters</h4>
                        <table class="graybox">
                          <tbody>
                            <tr>
                              <td>
                                <code>
                                <em>properties</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>properties dictionary</p>
                                </div>
                              </td>
                            </tr>
                          </tbody>
                        </table>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:8Mixpanel5GroupC5unset8propertyySS_tF"></a>
                    <a name="//apple_ref/swift/Method/unset(property:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:8Mixpanel5GroupC5unset8propertyySS_tF">unset(property:<wbr>)</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Remove a property and its value from a group&rsquo;s profile in Mixpanel Groups.</p>

<p>For properties that don&rsquo;t exist there will be no effect.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">open</span> <span class="kd">func</span> <span class="nf">unset</span><span class="p">(</span><span class="nv">property</span><span class="p">:</span> <span class="kt">String</span><span class="p">)</span></code></pre>

                        </div>
                      </div>
                      <div>
                        <h4>Parameters</h4>
                        <table class="graybox">
                          <tbody>
                            <tr>
                              <td>
                                <code>
                                <em>property</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>name of the property to unset</p>
                                </div>
                              </td>
                            </tr>
                          </tbody>
                        </table>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:8Mixpanel5GroupC6remove3key5valueySS_AA0A4Type_ptF"></a>
                    <a name="//apple_ref/swift/Method/remove(key:value:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:8Mixpanel5GroupC6remove3key5valueySS_AA0A4Type_ptF">remove(key:<wbr>value:<wbr>)</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Removes list properties.</p>

<p>Property keys must be String objects and the supported value types need to conform to MixpanelType.
MixpanelType can be either String, Int, UInt, Double, Float, Bool, [MixpanelType], [String: MixpanelType], Date, URL, or NSNull.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">open</span> <span class="kd">func</span> <span class="nf">remove</span><span class="p">(</span><span class="nv">key</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span> <span class="nv">value</span><span class="p">:</span> <span class="kt"><a href="../Protocols/MixpanelType.html">MixpanelType</a></span><span class="p">)</span></code></pre>

                        </div>
                      </div>
                      <div>
                        <h4>Parameters</h4>
                        <table class="graybox">
                          <tbody>
                            <tr>
                              <td>
                                <code>
                                <em>properties</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>mapping of list property names to values to remove</p>
                                </div>
                              </td>
                            </tr>
                          </tbody>
                        </table>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:8Mixpanel5GroupC5union3key6valuesySS_SayAA0A4Type_pGtF"></a>
                    <a name="//apple_ref/swift/Method/union(key:values:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:8Mixpanel5GroupC5union3key6valuesySS_SayAA0A4Type_pGtF">union(key:<wbr>values:<wbr>)</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Union list properties.</p>

<p>Property values must be array objects.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">open</span> <span class="kd">func</span> <span class="nf">union</span><span class="p">(</span><span class="nv">key</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span> <span class="nv">values</span><span class="p">:</span> <span class="p">[</span><span class="kt"><a href="../Protocols/MixpanelType.html">MixpanelType</a></span><span class="p">])</span></code></pre>

                        </div>
                      </div>
                      <div>
                        <h4>Parameters</h4>
                        <table class="graybox">
                          <tbody>
                            <tr>
                              <td>
                                <code>
                                <em>properties</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>mapping of list property names to lists to union</p>
                                </div>
                              </td>
                            </tr>
                          </tbody>
                        </table>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:8Mixpanel5GroupC06deleteB0yyF"></a>
                    <a name="//apple_ref/swift/Method/deleteGroup()" class="dashAnchor"></a>
                    <a class="token" href="#/s:8Mixpanel5GroupC06deleteB0yyF">deleteGroup()</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Delete group&rsquo;s record from Mixpanel Groups.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">open</span> <span class="kd">func</span> <span class="nf">deleteGroup</span><span class="p">()</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
              </ul>
            </div>
          </section>
        </section>
        <section id="footer">
          <p>&copy; 2025 <a class="link" href="http://mixpanel.com" target="_blank" rel="external noopener">Mixpanel</a>. All rights reserved. (Last updated: 2025-04-24)</p>
          <p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external noopener">jazzy ♪♫ v0.14.2</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external noopener">Realm</a> project.</p>
        </section>
      </article>
    </div>
  </body>
</html>
